package com.cloudpolice.equipment.dao;

import com.cloudpolice.equipment.model.EquipmentMessageModel;
import com.cloudpolice.equipment.model.InPutParam.EquipmentMessageSelectInParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ：梁昊，后端工程师：flyman5，前端工程师：孙耀
 * @create 2020-04-01 22:33
 * @function
 * @editLog
 */
@Mapper
public interface EquipmentMessageMapper {
    /**
     * 根据社区ID或区域ID得到消息与通知信息
     *
     * @param id
     * @return 设备基本信息
     */
    EquipmentMessageModel selectEquipmentMessageById(@Param("id") String id);

    /**
     * 根据社区ID或区域ID得到消息与通知信息
     *
     * @param equipmentMessageSelectInParam 输入参数
     * @return 设备基本信息
     */
    List<EquipmentMessageModel> selectEquipmentMessageByCom(EquipmentMessageSelectInParam equipmentMessageSelectInParam);

    /**
     * 修改门禁机消息与通知
     *
     * @param equipmentMessageModel com.cloudpolice.equipment.model.InPutParam.EquipmentMessageModel
     * @return 影响条件
     */
    int updateEquipmentMessage(EquipmentMessageModel equipmentMessageModel);

    /**
     * 删除门禁机消息与通知
     *
     * @param equipmentMessageModel com.cloudpolice.equipment.model.InPutParam.EquipmentMessageModel
     * @return 影响条件
     */
    int deleteEquipmentMessageAuto(EquipmentMessageModel equipmentMessageModel);
    /**
     * 删除门禁机消息与通知
     *
     * @param equipmentMessageModel com.cloudpolice.equipment.model.InPutParam.EquipmentMessageModel
     * @return 影响条件
     */
    int deleteEquipmentMessage(EquipmentMessageModel equipmentMessageModel);

    /**
     * 增加门禁机消息与通知
     *
     * @param equipmentMessageModel com.cloudpolice.equipment.model.InPutParam.EquipmentMessageModel
     * @return 影响条件
     */
    int insertEquipmentMessage(EquipmentMessageModel equipmentMessageModel);

    /**
     * 根据设备SN号得到消息与通知信息
     *
     * @param equipmentMessageSelectInParam 输入参数
     * @return 设备基本信息
     */
    List<EquipmentMessageModel> selectEquipmentMessageBySn(EquipmentMessageSelectInParam equipmentMessageSelectInParam);
}
